function send() {
    var username = document.getElementById("username").value;
    var password = document.getElementById("password").value;
    // var url=document.getElementById("form").attributes["action"].nodeValue;
    // var type=document.getElementById("form").attributes["method"].nodeValue;
    var data = {
        "appId": username,
        "password": password,
        "role": "MEMBER"
    };
    var json_data = JSON.stringify(data);
    $.ajax({
        type: "post",
        url: "/account/login",
        contentType: "application/json;charset=UTF-8",
        dataType:"json",
        data: json_data,
        success: function (res) {
            if(res.code==1003){
                var data=JSON.stringify(res.data);
                console.log(data);
                var storage=window.localStorage;
                storage.setItem("data",data)
                console.log("包含token的data已保存")
                /*
                var storage = window.localStorage;
                storage.setItem("c",3);
                storage.getItem("c");
                storage.removeItem("c");  /删除指定key
                storage.clear(); //clear清除所有的key/value
                */
                document.write("登录成功，正在跳转....")
                setTimeout('location.assign("home.html")',2000);
            }
            else {
                alert(code.msg+",请重新登录");
            }
        }
    })
}